<link href="static/js/jqplugins/starrating/jquery.rating.css" rel="stylesheet" type="text/css">
<div class="order-body">
{if  $arrOrderInfo['order_status'] == 'arbitral'}

			<p class="lead text-center text-success mt_20"><i class="fa fa-check-circle"></i> 该订单进入仲裁、请等待客服处理</p>

{else}
						<form role="form" action="index.php?do=mark" method="post" class="form-horizontal" name="markForm" id="markForm">
			            <input type="hidden" name="formhash" id="formhash" value="{FORMHASH}">
						<input type="hidden" name="markId"  value="{$markInfo[mark_id]}">
						<input type="hidden" name="taskId"  value="{$taskId}">
						<input type="hidden" name="strJumpUrl"  value="{$strJumpUrl}">

			      	{if $markInfo['mark_count']== 1}
						<div class="form-group">
							<label for="" class="col-xs-2 control-label">修改好评</label>
							<div class="col-xs-10 form-inline">
								<span>修改评价提醒</span></br>
								<span>1.您只有一次修改评价的机会，请珍惜。</span></br>
								<span>2.只有在评价期内的差评，中评才有修改机会。</span>
						    </div>
					    </div>
						{/if}
						{if $markInfo['mark_count']< 2 }
			      <div class="form-group">
			        <label for="" class="col-xs-2 control-label">给对方的评价</label>
			        <div class="col-xs-10 form-inline">
			        {if $markInfo['mark_status'] == 0 || $markInfo['mark_status'] == 2 || $markInfo['mark_status'] == 3}
			          <div class="radio">
			            <label>
			              <input type="radio" name="mark_status" id="mark_status" value="1" {if $markInfo['mark_status']==1||!$markInfo['mark_status']}checked=checked{/if}>
			              好评
			              <img src="static/img/ico/ico_mark_1.gif" alt="好评">
			            </label>
			          </div>
			          {/if}
			          {if $markInfo['mark_status'] == 0 || $markInfo['mark_status'] == 3}
			          <div class="radio">
			            <label>
			              <input type="radio" name="mark_status" id="mark_status" value="2" {if $markInfo['mark_status']==2}checked=checked{/if}>
			              中评
			              <img src="static/img/ico/ico_mark_2.gif" alt="中评">
			            </label>
			          </div>
			          {/if}
			          {if $markInfo['mark_status'] == 0 }
			          <div class="radio">
			            <label>
			              <input type="radio" name="mark_status" id="mark_status" value="3" {if $markInfo['mark_status']==3}checked=checked{/if}>
			              差评
			              <img src="static/img/ico/ico_mark_3.gif" alt="差评">
			            </label>
			          </div>
			          {/if}
			        </div>
			      </div>

			      <div class="form-group">
			        <label for="" class="col-xs-2 control-label">评价内容</label>
			        <div class="col-xs-10">
			          <textarea id="tar_content" name="tar_content" class="form-control">{if $markInfo['mark_content']}{$markInfo['mark_content']}{/if}</textarea>
			            <p class="help-block">最多可以输入:100字符</p>
			        </div>
			      </div>

			      <div class="form-group">
			        <label for="" class="col-xs-2 control-label">评价质量</label>
			        <div class="col-xs-10">
			          {loop $aidInfo $k $v}
						<input type="hidden" name="star[$k]" id="star_{$k}" value="{$v['star']}">
			          <div class="form-control-static clearfix">
			            <div class="pull-left mr_5">{$v['aid_name']}</div>
			           <!--{eval echo keke_user_mark_class::gen_star($v[avg],$k,0);}-->
			          </div>
					  	{/loop}
			        </div>
			      </div>
			      <div class="text-center">
			        <button type="submit" class="btn btn-default" onclick="return checkStar();">提交</button>
			      </div>
				  {/if}
			      </form>
{/if}
		</div>





    <!-- deliver-content end -->
<script type="text/javascript" src="static/js/jqplugins/starrating/jquery.MetaData.js"></script>
<script type="text/javascript" src="static/js/jqplugins/starrating/jquery.rating.js"></script>
<script type="text/javascript">
$(function(){
    $('#markForm').scojs_valid({
	    rules: {
	    	tar_content: ['not_empty',{'min_length': 5},{'max_length': 100}]
	    },
	    messages: {
	    	tar_content: {
				not_empty: "请输入评价内容",
				min_length: "最少输入5字符",
				max_length: "最多可以输入:100字符"
			}
	    },
	    wrapper:'.form-group'
	    ,onSuccess: function(response, validator, form) {
	    	  tipsOp(response.data);
				if(response.url){
					setTimeout(function(){window.location.href=response.url;},1000);
				}
	    }
	});
	$("div[class*='star_']").click(function(event){
		var classStr = this.className;
		var showId   = classStr.match(new RegExp("(star_[0-9]+)","g"));
		var point    = $(this).find("a:first").attr("tt");
			point	 = parseFloat(point/2).toFixed(1);
		$("#"+showId).val(point);
		$("#span_"+showId).html("<font color=\"red\">"+point+"{$_lang['fen']}</font>");
		event.stopPropagation();
	})
	$("div[class='rating-cancel']").click(function(event){
		//alert($(this).closest('.form-control-static').prev('input').val());
		$(this).closest('.star-rating-control').siblings('span[id*=span_star_*]').html("<font color=\"red\">0.0{$_lang['fen']}</font>");
		$(this).closest('.form-control-static').prev('input').val(0);

	    })
	})
	function checkStar(){
		 var falg = 0;
         $("input[id*='star_']").each(function(){
             if($(this).val()>0){
			 	falg += 1;
			 }
		 })
			 if (falg > 0){
	 			return true;
			 } else{
				tipsOp('<div class="alert alert-danger"><i class="fa fa-ban"></i> 请先进行星级评定</div>');return false;
			 	return false;
			 }
		 }
</script>